package com.example.hxds.mis.api.service.impl;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @BelongsProject: hxds
 * @BelongsPackage: com.example.hxds.mis.api.controller.form
 * @Author: wanglansheng
 * @CreateTime: 2024-01-14  15:35
 * @Description: TODO
 * @Version: 1.0
 */
@Data
@Schema(description = "分页查询司机数据")
public class SearchDriverByPageForm {
    @NotNull(message = "page不能为空")
    @Min(value = 1, message = "page必须大于0")
    @Schema(description = "页数")
    private Integer page;

    @NotNull(message = "length不能为空")
    @Min(value = 1, message = "length必须大于0")
    @Schema(description = "每页记录数")
    private Integer length;

    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{2,10}$",message = "name内容不正确")
    @Schema(description = "姓名")
    private String name;

    @Pattern(regexp = "^1\\d{10}$",message = "tel内容不正确")
    @Schema(description = "手机号")
    private String tel;

    @Pattern(regexp = "^[1-9]\\d{5}(18|19|([23])\\d{2})$",message = "openId内容不正确")
    @Schema(description = "身份证")
    private String pid;

    @Pattern(regexp = "^男$|^女$",message = "sex内容不正确")
    @Schema(description = "性别")
    private String sex;

    @Range(min = 1,max = 3,message = "实名认证内容不正确")
    @Schema(description = "实名认证")
    private String realAuth;

    @Range(min = 1,max = 3,message = "实名认证内容不正确")
    @Schema(description = "状态")
    private String status;
}
